#include<iostream>
using namespace std;
int main(){
	int n,k=0;
	cin>>n;
	while(n!=1){
		if(n%2){
			n=(3*n+1)/2;
			k++;
		}else{
			n/=2;
			k++;
		}
	}
	cout<<k;
	return 0;
} 
